﻿// JavaScript Document

function preLoadInit(){

	$('<div id="preLoad"></div>').appendTo('body');
	
	$('div#preLoad').css({
		width:screen.width,
		height:screen.height,
		backgroundColor:"#625d70",
		position:"fixed",
		zIndex:99999,
		top:"0px",
		left:"0px"
	});

};

function preLoadClose(){
	
	TweenLite.to( $('#preLoadBox'), 0.4, { css:{ top:-200}, ease:Back.easeIn });
	TweenLite.to( $('#preLoad'), 0.6, { css:{ height:0 }, ease:Quart.easeOut, onComplete:aniFIN, delay:0.2 });
	
	function aniFIN(){
		$('#preLoadBox').css({ display:"none" });
		$('#preLoad').css({ display:"none" });
	};
	
};